package com.example.chat.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.example.chat.BuildConfig;
import com.example.chat.R;
import com.example.chat.R2;
import com.example.constants.Constants;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

@Route(path = Constants.CHAT_ACTIVITY_URL)
public class ChatMainActivity extends AppCompatActivity{

    @BindView(R2.id.tv_title)
    TextView tvTitle;

    @Autowired
    String chat;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chat_main);
        ButterKnife.bind(this);
        ARouter.getInstance().inject(this);
//        tvTitle.setText(getIntent().getStringExtra("chat")+"");
        tvTitle.setText(chat);
    }

    @OnClick({R2.id.tv_title})
    public void onClick(View view){
        if(view.getId() == R.id.tv_title){
            finish();
        }
    }
}
